﻿@model Stardust.Models.HabitacionBean

@{
    ViewBag.Title = "Modificar Habitación";
}

<h2>@ViewBag.Title</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@Html.ValidationSummary(true)

@using (Html.BeginForm("Edit", "Habitacion", FormMethod.Post, new { @class = "form"}))
{
    <fieldset>
        <div class = "widget" >
            <div class = "title" >
                <img src="@Url.Content("~/Content/images/icons/dark/list.png")" alt class="titleIcon">                            
                <h6> @ViewBag.Title </h6>
            </div>

            <div class = "formRow" >
                @Html.LabelFor(model => model.idHotel )
                <div class = "formRight" > 
                    @Html.DropDownListFor(model => model.idHotel, new SelectList(ViewBag.listaHoteles, "ID", "nombre"), "Elija un Hotel", new { onchange = "this.form.submit();" })
                    @Html.ValidationMessageFor(model => model.idHotel)
                </div>
                <div class = "clear" ></div>
            </div>
            
            <div class = "formRow" >
                @Html.LabelFor(model => model.idTipoHabitacion)
                <div class = "formRight" > 
                    @Html.DropDownListFor(model => model.idTipoHabitacion, new SelectList(ViewBag.listaTipoHabitacion, "ID", "nombre"), "Elija un Tipo de Habitación")
                    @Html.ValidationMessageFor(model => model.idTipoHabitacion)
                </div>
                <div class = "clear" ></div>
            </div>

            <div class = "formRow" >
                @Html.LabelFor(model => model.piso)
                <div class = "formRight" > 
                    @Html.TextBoxFor(model => model.piso) 
                    @Html.ValidationMessageFor(model => model.piso)
                </div>
                <div class = "clear" ></div>
            </div>
            
            <div class = "formRow" >
                @Html.LabelFor(model => model.estado)
                <div class = "formRight" > 
                    @Html.TextBoxFor(model => model.estado)
                    @Html.ValidationMessageFor(model => model.estado)
                </div>
                <div class = "clear" ></div>
            </div>

            <div class = "formRow" >
                @Html.LabelFor(model => model.nroBanos)
                <div class = "formRight" > 
                    @Html.TextBoxFor(model => model.nroBanos)
                    @Html.ValidationMessageFor(model => model.nroBanos)
                </div>
                <div class = "clear" ></div>
            </div>

            <div class = "formRow" >
                @Html.LabelFor(model => model.aptoFumador)
                <div class = "formRight" > 
                    @Html.EditorFor(model => model.aptoFumador)
                    @Html.ValidationMessageFor(model => model.aptoFumador)
                </div>
                <div class = "clear" ></div>
            </div>

            <div class = "formRow" >
                @Html.LabelFor(model => model.nroCamas)
                <div class = "formRight" > 
                    @Html.TextBoxFor(model => model.nroCamas)
                    @Html.ValidationMessageFor(model => model.nroCamas)
                </div>
                <div class = "clear" ></div>
            </div>
             <div class = "formRow" >
                @Html.LabelFor(model => model.numero)
                <div class = "formRight" > 
                    @Html.TextBoxFor(model => model.numero)
                    @Html.ValidationMessageFor(model => model.numero)
                </div>
                <div class = "clear" ></div>
            </div>
        </div>
        <p>
            <input class = "redB" type="submit" value="Guardar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Regresar", "List")
</div>